home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2004 #6 / Amiga Plus CD - 2004 - No. 06.iso / AmiSoft / Comm / misc / trsi-ftpd01.lha / FAME-FTPd / source / global_defines.h < prev    next >
C/C++ Source or Header  |  2004-04-24  |  5KB  |  111 lines

  1. /**************************************************************************************************
  2.  *  PROJECT: FAME-FTPd
  3.  *     FILE: global_defines.h
  4.  *  PURPOSE: All defines used in FTPd and Configuration program
  5.  *  CREATED: 05-MAY-2003
  6.  * MODIFIED: 25-JAN-2004
  7.  *   AUTHOR: Sascha 'SieGeL' Pfalz
  8.  **************************************************************************************************/
  9.  
  10. #define    BLKSIZE            4096                                /* Chunk size for file I/O */
  11. #define CMDBUF_SIZE    1024                              /* Size for read buffer */
  12. #define CMDBUF_TEMP 2048                                /* Size for temporary read buffer (max MTU) */
  13.  
  14. #define    ASCII_TYPE        0                                    /* ASCII Type */
  15. #define    IMAGE_TYPE        1                                    /* Binary Type */
  16. #define    LOGICAL_TYPE    2                                    /* Logical type (Binary) */
  17.  
  18. #define IPPORT_FTPD 20                                    /* Default FTP Data port */
  19. #define CTLZ        26                                            /* EOF for CP/M systems */
  20.  
  21. #define UC(b) (((int) b) & 0xff)        /* Define used to mask out PORT/PASV ports */
  22.  
  23. #define EOF (-1)                                                /* End-of-line indicator, see stdio.h */
  24. #define    LOG_FTP            (11<<3)                            /* ftp daemon (missed in Amitcp headers?) */
  25. #define OK (0)                          /* OK define ;) */
  26. #define SOCKETNAME "bsdsocket.library"    /* Name of BSD socket library */
  27.  
  28. #define FILENAME_LENGTH    28              /* Max. allowed length of filenames (B514+) */
  29.  
  30. #define CONNECT_RETRY    5                             /* For data connections we try it more than once / Used also for NSLookup-retry */
  31. #define CONNECT_WAIT    20                            /* We wait 20/50s between two connection attempts */
  32.  
  33. #define CRLF_STRIP        0                                    /* for usprintf() -> Kill all CRLF and append our own */
  34. #define CRLF_NOSTRIP    1                             /* for usprintf() -> Send merged string as passed */
  35.  
  36. #define SetError(x)((struct Process *)FindTask(NULL))->pr_Result2 = x    /* Define to set result before exit() */
  37.  
  38. #define STATS_FILE_RETRY        10                        /* Retry Counter when accessing stats file */
  39. #define STATS_RETRY_DELAY        25                        /* Retry delay in x/50 seconds before retry accessing stats file */
  40. #define STATS_TASKADDRESS        0             /* Field 0 of Statusfile -> Task Address */
  41. #define    STATS_USERID                1                            /* Field 1 of Statusfile -> UserNumber */
  42. #define    STATS_ACTIONSTRING    2             /* Field 2 of Statusfile -> Action String */
  43. #define STATS_ULFILES       3                            /* Amount of Files uploaded this session */
  44. #define STATS_ULBYTES                4             /* Amount of Bytes uploaded this session */
  45. #define STATS_CONNECTTIME        5                            /* Date string in USA format when user connected */
  46.  
  47. #define WTS_RETRY                        10            /* How often we will retry to save our stats */
  48. #define WTS_RETRY_DELAY            25            /* Dely in 1/50s between retries */
  49.  
  50. /**************************************************************************************************
  51.  * Defines for all supported FTP Commands
  52.  **************************************************************************************************/
  53.  
  54. #define CMD_USER     0
  55. #define CMD_PASS     1
  56. #define CMD_TYPE    2
  57. #define CMD_LIST    3
  58. #define CMD_CWD        4
  59. #define    CMD_QUIT  5
  60. #define CMD_RETR  6
  61. #define CMD_STOR  7
  62. #define CMD_PORT  8
  63. #define CMD_NLST  9
  64. #define CMD_PWD        10
  65. #define CMD_XPWD    11
  66. #define CMD_MODE    12
  67. #define CMD_PASV    13
  68. #define CMD_SYST    14
  69. #define CMD_NOOP    15
  70. #define CMD_XCWD  16
  71. #define CMD_CDUP    17
  72. #define CMD_SIZE    18
  73. #define CMD_STRU    29
  74. #define CMD_ABOR    20
  75. #define CMD_FEAT    21
  76. #define CMD_CLNT    22
  77. #define CMD_HELP    23
  78. #define CMD_STAT    24
  79.  
  80. /**************************************************************************************************
  81.  * Defines for FTPdConfig->Flags1:
  82.  **************************************************************************************************/
  83.  
  84. #define    CFG_USEDEBUG    (1 << 0)                    /* If we should open the Debug Window */
  85. #define CFG_USEDNS        (1 << 1)                  /* If we should resolve hostnames */
  86. #define CFG_WEEKTOP        (1 << 2)                            /* Support for aCID-tOP? */
  87.  
  88. /**************************************************************************************************
  89.  * Defines used in Configuration tool:
  90.  **************************************************************************************************/
  91.  
  92. #define REG(x) register __ ## x
  93. #define ASM    __asm
  94. #define SAVEDS __saveds
  95. #ifndef MAKE_ID
  96. #define MAKE_ID(a,b,c,d) ((ULONG) (a)<<24 | (ULONG) (b)<<16 | (ULONG) (c)<<8 | (ULONG) (d))
  97. #endif
  98.  
  99. #define ID_SAVE                    1                                        /* "Save" Button */
  100. #define ID_ABOUT                 2                                        /* "About" menu entry */
  101. #define ID_ABOUT_MUI        3                                        /* "About MUI..." menu entry */
  102. #define ID_ABOUTCLOSE        4                   /* "Cancel" button/CloseWindow/ESC */
  103. #define ID_UPDATE                5                                        /* "Update Task Monitor" menu entry */
  104. #define ID_DOUBLESTART     666                                    /* To recognize double app start */
  105. #define ID_ULHELPFILE        900                    /* Unique ID for "How_To_Upload.txt" popstring */
  106. #define ID_ULTEMPDIR        901                                    /* Unique ID for "Upload temp path" popstring */
  107. #define ID_IPFILE                902                 /* Unique ID for "Use IP from this File" popstring */
  108. #define ID_TITLEFILE        903                                    /* Unique ID for "Login ASCII:" popstring */
  109. #define ID_LOGDIR                904                                    /* Unique ID for "Logfile path:" popstring */
  110. #define ID_STATSDIR            905                                    /* Unique ID for "Statistics path:" popstring */
  111.